#ifndef KC_HASH_DB_H
#define KC_HASH_DB_H

#include <kchashdb.h>
#include "KeyValueDB.h"

using namespace kyotocabinet;

class KCHashDB : public KeyValueDB {
public:

	string db_path; /* get from mds _conf_ */
	HashDB *db;

public:

	int open();
	int close();
	
	int set(string &key, string *value); //create or update
	int get(string &key, string *value);
	int remove(string &key);

	int multi_remove(string &key_prefix)
	{
		return 0;
	}
	KCHashDB(string path):
		db_path(path),
		db(NULL){
		db = new HashDB();
	}
	~KCHashDB() {
		close();
		delete db;
	}

};
#endif
